<?php
include ('../__global.php');

class login extends ml_controller
{
    public function initParam()
    {}
    public function checkParam()
    {
    if (!$this->check_permission(ML_PERMISSION_LOGOUT_ONLY)) {
            $this->redirect(ML_PAGE_SELFINDEX);
        }    
//    if ($this->check_permission(ML_PERMISSION_UNVERIFY_CANREAD)) {//激活页面可以返回到登录页面
//            
//            $this->loginProxy(ml_logout);
//            
//        }
        

    }
    public function main()
    {
        ml_tool_actionlog::add_other_action($this->__visitor['uid'] , ML_SINAACTCODE_VIEW_LOGIN);
        
        $vcodeflag = 'none';
        $oSession = $this->getSession();
        $count = $oSession->getVal('login_fail_count');
        if (2< $count) $vcodeflag = '';

        $data = array(
            'scode' => ml_tool_securecode::init_scode(),
            'vcodeflag' => $vcodeflag,
        );


        $this->set_page_title2("登录");
        $this->page_output('user::login' , $data);
    }

}
new login();